project "Catentacle"
    kind "StaticLib"
    language "C++"
    cppdialect "C++17"
    staticruntime "off"

    targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
    objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
    
    pchheader "pch.h"
    pchsource "src/pch.cpp"

    files{
        "src/**.h",
        "src/**.cpp",
        "vendor/stb_image/*.h",
        "vendor/stb_image/*.cpp",
        "vendor/glm/glm/**.hpp",
        "vendor/glm/glm/**.inl",

        "vendor/ImGuizmo/ImGuizmo.h",
        "vendor/ImGuizmo/ImGuizmo.cpp"
    }

    defines{
        "_CRT_SECURE_NO_WARNINGS",
        "GLFW_INCLUDE_NONE",
		"_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING",
        "_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING",
        "_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS"
    }

    includedirs{
        "src",
        "vendor/spdlog/include",
        "%{IncludeDir.GLFW}",
        "%{IncludeDir.ImGui}",
        "%{IncludeDir.Glad}",
        "%{IncludeDir.glm}",
        "%{IncludeDir.stb_image}",
        "%{IncludeDir.entt}",
		"%{IncludeDir.yaml_cpp}",
		"%{IncludeDir.ImGuizmo}",
		"%{IncludeDir.Box2D}"
    }

    links{
        "GLFW",
        "Glad",
        "ImGui",
        "yaml-cpp",
        "Box2D",
        "OpenGL32.lib"
    }

    filter "files:vendor/ImGuizmo/**.cpp"
	flags { "NoPCH" }

    filter "system:windows"
        systemversion "latest"

        defines{
            "CT_PLATFORM_WINDOWS",
            "CT_BUTLD_DLL",
            "CT_ENABLE_ASSERTS",
            "GLFW_INCLUDE_NONE"
        }

    filter "configurations:Debug"
        defines "CT_DEBUG"
        runtime "Debug"
        symbols "on"            -- 
 
    filter "configurations:Release"
        defines "CT_RELEASE"
        runtime "Release"
        optimize "on"           -- 

    filter "configurations:Dist"
        defines "CT_DIST"
        runtime "Release"
        optimize "on"           -- 
